<?php

class M_view extends CI_Model
{
	private $admin = 'administrative_employees';
	private $teach = 'teaching_personnel';

	public function get_admin($id = false)
	{
		$this->load->database();

		if($id !== false)
		{
			$query = $this->db->where('ae_id',$id)->get($this->admin);
			return $query->row();
		}else{
			$query = $this->db->get($this->admin);
			return $query->result();
		}
	}
	
	public function get_teach($id = false)
	{
		$this->load->database();
		if($id !== false)
		{
			$query= $this->db->where('tp_id',$id)->get($this->teach);
			return $query->row();	
		}else{
			$query= $this->db->get($this->teach);
			return $query->result();	
		}
	}
}